package team.nmsg.ge.system.bean;

import java.util.Date;

import team.nmsg.ge.system.interf.ISysBean;
import team.nmsg.ge.system.util.SysUtil;

import com.alibaba.fastjson.JSONObject;

public class PublishThreadInfo implements ISysBean{

	private String name;
	
	private SysUser createUser;
	
	private Long createTime;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public SysUser getCreateUser() {
		return createUser;
	}

	public void setCreateUser(SysUser createUser) {
		this.createUser = createUser;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	@Override
	public JSONObject toJson() {
		JSONObject ob = new JSONObject();
		ob.put("name", name);
		ob.put("createTimestamp", createTime);
		ob.put("createUsername", createUser.getUsername());
		ob.put("createTime", SysUtil.formatDateWithTime(new Date(createTime)));
		return ob;
	}
	
}
